﻿@model Web.Models.MatMenuListModel
@{
    ViewBag.Title = Model.PageTitle;
    ViewBag.SubTitle = Model.PageSubTitle;
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<div class="row">
    <div class="col-lg-12">
        <div class="panel">
            @*<div class="panel-heading">
                    <span><i class="fa fa-table fa-fw"></i></span>
                    信息列表
                </div>*@
            <div class="panel-body">
                <div class="row">
                    <div class="col-xs-6 col-md-4">
                        <a href="~/Home/Create" class="btn btn-info btn-sm"><i class="fa fa-plus fa-fw"></i>新 建</a>
                        <a href="~/Home/Index" class="btn btn-success btn-sm"><i class="fa fa-refresh fa-fw"></i>刷 新</a>
                    </div>
                    <div class="col-xs-6 col-sm-6 col-md-8">
                        <div class="input-group input-group-sm">
                            @Html.TextBoxFor(m => m.searchKey, new { @class = "form-control", placeholder = "查询关键字", id = "txtSearchkey" })
                            <span class="input-group-btn">
                                <button type="button" class="btn btn-default btn-sm" onclick="search();">查 找</button>
                            </span>
                        </div>
                    </div>
                </div>
                <table class="table table-striped table-hover">
                    <thead>
                        <tr>
                            <th>
                                序号
                            </th>
                            <th>
                                代码
                            </th>
                            <th>
                                名称
                            </th>
                            <th>
                                地址
                            </th>
                            <th>操作</th>
                        </tr>
                    </thead>
                    <tbody id="tb_2">
                        @*@Html.Partial("_MatMenuList", Model)*@
                    </tbody>
                </table>
                <!--分页组件 start-->
                <div class="pagination j_outerheight">
                    <div class="btm-tool con" id="Pagination"></div>
                    <span id="spanTS"></span>
                </div>
                <!--分页组件 end-->
            </div>
        </div>
    </div>
</div>
@section FootScript{

    <script type="text/javascript">

        function search() {
            LoadDataByPaging();
        }

        $(function () {
            LoadDataByPaging();
        });


        function LoadDataByPaging() {
            var ssContent = $("#txt_Search").val();
            if (ssContent == "输入符合的条件检索") {
                ssContent = "";
            }
            var data = new Object();
            data.SearchKey = $("#txtSearchkey").val();
            PagingQuery(0, '@Url.Action("GetMatMenuList")',
            data, "tb_2", CallBack);
        }

        function CallBack() {
            //数据加载完成后的回调方法
        }
    </script>

}